package com.ytjj.qmyx.supplychain.api.controller;


import com.ytjj.qmyx.supplychain.common.api.CommonResult;
import com.ytjj.qmyx.supplychain.common.model.request.StockWarningRequest;
import com.ytjj.qmyx.supplychain.service.StockWarningService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 库存预警
 */
@Slf4j
@RestController
@RequestMapping("/stockWarning")
public class StockWarningController {

    @Autowired
    private StockWarningService stockWarningService;


    /**
     * 查询库存预警数据
     *
     * @return
     */
    @PostMapping("/list")
    public CommonResult list(@RequestBody StockWarningRequest request) {
        return CommonResult.success(stockWarningService.list(request));
    }
}
